package com.sptan.framework.exception;


import org.springframework.http.HttpStatus;

/**
 * Description: 认证异常 .
 *
 * @author lp
 */
public class AuthRequestException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private Integer code;

    public AuthRequestException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public AuthRequestException(String message) {
        super(message);
        this.code = HttpStatus.UNAUTHORIZED.value();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
